<% breadcrumb :event_lottery_prizes %>

<div class="row">
  <div class="col-lg-12">
    <div class="ibox float-e-margins">
      <div class="ibox-title">
        <h5>抽奖活动列表</h5>
      </div>
      <div class="ibox-content">
        <div class="row">
          <div class="col-md-12 text-right">
            <%= link_to "添加抽奖活动", new_event_event_lottery_prize_path(current_event), class: "btn btn-white btn-sm"%>
          </div>
        </div>
        <table class="table table-striped table-hover">
          <thead>
            <tr>
              <td>#</td>
              <td>抽奖活动名称</td>
              <td>备注</td>
              <td>操作</td>
            </tr>
          </thead>
          <tbody>
            <% @event_lottery_prizes.each_with_index do |event_lottery_prize, index|%>
              <tr>
                <td><%= index %></td>
                <td>
                  <%= link_to event_lottery_prize.name, event_event_lottery_prize_path(current_event, event_lottery_prize) %>
                </td>
                <td><%= event_lottery_prize.comment %></td>
                <td>
                  <%= link_to '修改', edit_event_event_lottery_prize_path(current_event, event_lottery_prize), class: 'btn btn-xs btn-white' %>
                  <%= link_to '删除', event_event_lottery_prize_path(current_event, event_lottery_prize), method: :delete, class:  "btn btn-xs btn-danger", data: { confirm: '是否确认删除？' } %>
              </tr>
            <% end %>
          </tbody>
        </table>
      </div>
    </div>
  </div>
</div>
